import request from '@/utils/request'

export const listEmp = (search) =>
    request({
        url: '/emp',
        method: 'get',
        params: {
            offset: search.offset,
            limit: search.limit,
            name: search.name,
            deptId:search.deptId
        }
    })
export const updateEmp = (id, role) =>
    request({
        url: '/emp/' + id,
        method: 'put',
        data: role
    })

export const saveEmp = (emp) =>
    request({
        url: '/emp',
        method: 'post',
        data: emp
    })
export const removeEmp = (id) =>
    request({
        url: '/emp/' + id,
        method: 'delete'
    })
